<?php
namespace catchAdmin\basics\model\search;

trait RateSearch
{
    /*
     *  源币种
    */
    public function searchSourceCurrencyAttr($query, $value, $data)
    {
        return $query->where('source_currency', $value);
    }
    /*
     *  目表币种
    */
    public function searchTargetCurrencyAttr($query, $value, $data)
    {
        return $query->where('target_currency', $value);
    }
    /*
     *  生效时间
    */
    public  function searchStartDateAttr($query, $value, $data)
    {
        return $query->whereLike('start_date',$value);
    }
    /*
     *  失效时间
    */
    public  function searchEndDateAttr($query, $value, $data)
    {
        return $query->whereLike('end_date',$value);
    }
}